﻿using System;
using System.Diagnostics;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace HangerSupport
{
	[Transaction(TransactionMode.Manual)]
	[Regeneration(RegenerationOption.Manual)]
	public class cmdHSHelp : IExternalCommand
	{
		public Result Execute(ExternalCommandData cmdData, ref string messages, ElementSet elements)
		{
			Process.Start(this.hyGetPath());
			return Autodesk.Revit.UI.Result.Succeeded;
		}

		public string hyGetPath()
		{
			string installAppRootPath = Utils.GetInstallAppRootPath();
			return installAppRootPath + "\\Help\\HYEDD.chm";
		}
	}
}
